package com.sc.common.enums;

/**
 * Created by wust on 2019/4/29.
 * 按redis支持的存储类型分类：
 * REDIS_KEY_STRING_*
 * REDIS_KEY_LIST_*
 * REDIS_KEY_HASH_*
 * REDIS_KEY_SET_*
 * REDIS_KEY_SORTED_SET_*
 */
public enum  RedisKeyEnum {
    /****************** String Key S ********************/
    REDIS_KEY_STRING_VERIFICATION_CODE("%s_%s_%s_REDIS_KEY_STRING_VERIFICATION_CODE"), // 获取验证码key：操作类型_账号_验证码_REDIS_KEY_STRING_VERIFICATION_CODE，1注册|2app登陆|3找回密码|4web登录
    /****************** String Key E ********************/


    /****************** Hash Key S ********************/
    REDIS_KEY_HASH_GROUP_LOOKUP_BY_ROOT_CODE_AND_NAME_AND_LANG("%s_%s_%s_REDIS_KEY_HASH_GROUP_LOOKUP_BY_ROOT_CODE_AND_NAME_AND_LANG"),
    REDIS_KEY_HASH_GROUP_LOOKUP_BY_CODE_AND_LANG("%s_%s_REDIS_KEY_HASH_GROUP_LOOKUP_BY_CODE_AND_LANG"),
    REDIS_KEY_HASH_GROUP_LOOKUP_BY_PID_AND_LANG("%s_%s_REDIS_KEY_HASH_GROUP_LOOKUP_BY_PID_AND_LANG"),
    REDIS_KEY_HASH_GROUP_DATA_SOURCE_BY_GROUP_NAME("%s_REDIS_KEY_HASH_GROUP_DATA_SOURCE_BY_GROUP_NAME"),
    REDIS_KEY_HASH_GROUP_DATA_SOURCE_BY_GROUP_NAME_AND_PROJECT_ID("%s_%S_REDIS_KEY_HASH_GROUP_DATA_SOURCE_BY_GROUP_NAME_AND_PROJECT_ID"),
    REDIS_KEY_HASH_GROUP_DATA_SOURCE_DETAIL_BY_DATA_SOURCE_ID("%s_REDIS_KEY_HASH_GROUP_DATA_SOURCE_DETAIL_BY_DATA_SOURCE_ID"),
    REDIS_KEY_HASH_GROUP_BRANCH_COMPANY_BY_USER_ID("%s_REDIS_KEY_HASH_GROUP_BRANCH_COMPANY_BY_USER_ID"), // 当前登录用户所属分公司集合
    REDIS_KEY_HASH_GROUP_PROJECT_BY_USER_ID("%s_REDIS_KEY_HASH_GROUP_PROJECT_BY_USER_ID"), // 当前登录用户所属项目集合
    REDIS_KEY_HASH_GROUP_COMPANY_BY_NAME("%s_REDIS_KEY_HASH_GROUP_COMPANY_BY_NAME"),
    REDIS_KEY_HASH_GROUP_PROJECT_BY_NAME("%s_REDIS_KEY_HASH_GROUP_PROJECT_BY_NAME"),
    REDIS_KEY_HASH_GROUP_APP_TOKEN_BY_APP_ID("%s_REDIS_KEY_HASH_GROUP_APP_TOKEN_BY_APP_ID"),
    REDIS_KEY_HASH_GROUP_ORGANIZATION_BY_PID("%s_REDIS_KEY_HASH_GROUP_ORGANIZATION_BY_PID"),
    REDIS_KEY_HASH_GROUP_ORGANIZATION_BY_RELATION_ID_AND_TYPE("%s_%s_REDIS_KEY_HASH_GROUP_ORGANIZATION_BY_RELATION_ID_AND_TYPE"),
    REDIS_KEY_HASH_GROUP_ACCOUNT_BY_CODE("%s_REDIS_KEY_HASH_GROUP_ACCOUNT_BY_CODE"),
    REDIS_KEY_HASH_GROUP_GATEWAY_BY_MAC("%s_REDIS_KEY_HASH_GROUP_GATEWAY_BY_MAC"),
    /****************** Hash Key E ********************/


    REDIS_KEY_PRIMARY_SELECT_BY_PRIMARY_KEY("%s_%s_REDIS_KEY_PRIMARY_SELECT_BY_PRIMARY_KEY"),
    REDIS_KEY_SELECT_ONE("%s_%s_REDIS_KEY_SELECT_ONE"),
    REDIS_KEY_SELECT_ONE_EXAMPLE("%s_%s_REDIS_KEY_SELECT_ONE_EXAMPLE"),

    REDIS_KEY_COMPANY_ID_LIST("REDIS_KEY_COMPANY_ID_LIST");

    RedisKeyEnum(String stringValue){
        this.stringValue = stringValue;
    }

    private String stringValue;
    public String getStringValue() {
        return stringValue;
    }
}
